# !/usr/bin/env python
# -*- coding: utf-8 -*-

# @ author = 'zoushunli'
# @ author_email = '409358374@qq.com'
from flask import Flask, render_template
import datetime
app = Flask(__name__)

# @app.route('/user/<name>,<age>')
# def demo(name, age):
#     return 'hello, world! %s %s' % (name, age)
#
#
# @app.route('/user/<name>,<int:age>')  # 还有floa 类型
# def demo1(name, age):
#     return 'hello, world! %s %d' % (name, age)
#
#
# @app.route('/')
# def demo2():
#     return render_template('index.html')


@app.route('/')
def demo3():
    mtime = datetime.date.today()
    mname = ['张三', '王五', '小四']
    mtask = {'job': 'clear', 'datatime': 'three hours'}
    return render_template('index.html', var=mtime, xlist=mname, mtask=mtask)

def main():
    app.run(debug=True)

if __name__ == "__main__":
    main()